<template>
	<view class="public-order">
		<!-- 列表 -->
		<view v-if="fast" class="padd_32">
			<!-- 地址选择 -->
			<view class="address" @click="open_adds">
				<view class="title">服务地址</view>
				<view class="cont clearfix">
					<view class="fl">
						<view class="name">{{addAct.contactsName}}</view>
						<view class="phone">{{addAct.contactsPhone}}</view>
						<view class="add">{{addAct.province}}{{addAct.city}}{{addAct.region}}{{addAct.address}}</view>
					</view>
					<image src="/static/images/r-arrow.png" class="fr" mode="widthFix"></image>
				</view>
			</view>
			<!-- 上门时间 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					上门时间
					<image src="/static/images/r-arrow.png" mode="widthFix" class="fr"></image>
					<BiaofunDatetimePicker class="fr" placeholder="请选择日期时间" start="2000-01-01" end="2100-01-01" fields="minute" @change="changeDatetimePicker" v-model="time" >
					</BiaofunDatetimePicker>
				</view>
			</view>
			<!-- 服务类型 -->
			<view>
				<view class="title clearfix" @click="labShow">
					服务类型
					<image :src="labshow?'/static/images/middle_button_down@2x.png':'/static/images/r-arrow.png'" class="fr" :class="labshow?'down':''" mode="widthFix"></image>
					<text class="fr">{{showAct.name}}</text>
				</view>
				<view class="lebel" v-if="labshow">
					<text class="" v-for="(item, i) in list" :key="item.id" :data-id="item.id" :data-bue="item.univalenceUnit" :data-pri="item.univalence" :data-min="item.minPrice" :data-max="item.maxPrice" :data-num="item.minCount" :class="{ act: showAct.id == item.id }"  :data-type='item.name' @tap="tabSelect">{{item.name}}</text>
				</view>
			</view>
			<!-- 服务次数 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					服务次数(最小为{{showAct.num||'1'}})
					<text class="fr" v-if="showAct.pri">*{{showAct.pri}}{{showAct.bue}}</text>
					<input type="number" @blur="timeZero" v-model="safftime" class="fr"/>
				</view>
			</view>
			<view class="requirement1" style="border: none;">
				<view style="border: none;min-height: 70rpx;line-height: 70rpx;">服务价格(元)：<text style="font-size: 28rpx;">(指导价 ¥{{ (safftime*showAct.min).toFixed(2)||'-'}}至{{ (safftime*showAct.max).toFixed(2)||'-' }})</text></view>
				<view style="width: 100%;border: none;height: 50rpx;">
					<view class="fl" style="border: none;">￥</view>
					<view style="">
						<input type="digit" value="" placeholder="请输入" v-model="minPrice"/>
					</view>
					<view style="border: none;" class="fl">至</view>
					<view>
						<input type="digit" value="" placeholder="请输入" v-model="maxPrice"/>
					</view>
				</view>
			</view>
			<view class="requirement">
				<view>备注：</view>
				<input type="text" value="" placeholder="请输入" v-model="remarks"/>
			</view>
		</view>
		<!-- 套餐 -->
		<view v-if="meal">
			<view class="details padd_32">
				<view class="tit clearfix">
					<image src="/static/images/nav_icon_store@2x.png" class="fl" mode="widthFix"></image>
					<text class="fl">{{ detail.name }}</text>
					<image src="/static/images/middle_icon_next@2x.png" class="fl arr" mode="widthFix"></image>
				</view>
			</view>
			<view class="discount padd_32">
				<view class="share clearfix" style="width: 100%;">
					分享金可抵扣（{{balances.brokerage}}元）
					<view class="input"  style="width: 30%;">
						<wInput v-model="share" type="digit" placeholder="请输入"></wInput>
					</view>
				</view>
				<view class="share clearfix fl"  style="width: 100%;">
					余额剩余可支付（{{balances.balances}}元）
					<view class="input"  style="width: 30%;">
						<wInput v-model="surplus" type="digit" placeholder="请输入"></wInput>
					</view>
				</view>
			</view>
			<!-- <view class="payment padd_32" v-show="fast">
				<view class="tit">
					您需要支付的工资
					<text>（预计您支付1800）</text>
				</view>
				<view class="clearfix">
					￥
					<input type="number" value="" class="fr" />
				</view>
			</view> -->
			<view class="pay clearfix padd_32">
				总计：
				<text class="fr">RMB ¥{{ meal_price != '' ? meal_price : 0 }}</text>
			</view>
		</view>
		
		<!-- 员工 -->
		<view v-if="staff" class="padd_32">
			<!-- 地址选择 -->
			<view class="address" @click="open_adds">
				<view class="title">服务地址</view>
				<view class="cont clearfix">
					<view class="fl">
						<view class="name">{{addAct.contactsName}}</view>
						<view class="phone">{{addAct.contactsPhone}}</view>
						<view class="add">{{addAct.province}}{{addAct.city}}{{addAct.region}}{{addAct.address}}</view>
					</view>
					<image src="/static/images/r-arrow.png" class="fr" mode="widthFix"></image>
				</view>
			</view>
			<!-- 上门时间 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					上门时间
					<image src="/static/images/r-arrow.png" mode="widthFix" class="fr"></image>
					<BiaofunDatetimePicker class="fr" placeholder="请选择日期时间" start="2000-01-01" end="2100-01-01" fields="minute" @change="changeDatetimePicker"></BiaofunDatetimePicker>
				</view>
			</view>
			<!-- 服务类型 -->
			<view>
				<view class="title clearfix" @click="labShow">
					服务类型
					<image :src="labshow?'/static/images/middle_button_down@2x.png':'/static/images/r-arrow.png'" class="fr" :class="labshow?'down':''" mode="widthFix"></image>
					<text class="fr">{{showAct.name}}</text>
				</view>
				<view class="lebel" v-if="labshow">
					<text class="" v-for="(item, i) in lebelname" :key="item.businessId" :data-id="item.businessId" :data-bue="item.univalenceUnit" :data-pri="item.univalence" :data-min="item.minPrice" :data-max="item.maxPrice" :data-num="item.minCount" :class="{ act: showAct.id == item.businessId }"  :data-type='item.businessName' @tap="tabSelect">{{item.businessName}}</text>
				</view>
			</view>
			<!-- 服务次数 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					服务次数(最小为{{showAct.num||'1'}})
					<text class="fr">*{{showAct.pri}}{{showAct.bue}}</text>
					<input type="number" @blur="timeZero" v-model="safftime" class="fr"/>
				</view>
			</view>
			<view class="pay clearfix">
				服务价格：
				<text class="fr" v-if="meal">RMB ¥{{ price_pay != '' ? price_pay.toFixed(2) : price.toFixed(2) }}</text>
				<text class="fr" v-else>RMB ¥{{ (safftime * showAct.pri).toFixed(2) }}</text>
			</view>
			<view class="requirement">
				<view>备注：</view>
				<input type="text" value="" placeholder="请输入" v-model="remarks"/>
			</view>
		</view>
		<!-- end -->

		<!-- 业务 -->
		<view v-if="business" class="padd_32">
			<!-- 地址选择 -->
			<view class="address" @click="open_adds">
				<view class="title">服务地址</view>
				<view class="cont clearfix">
					<view class="fl">
						<view class="name">{{addAct.contactsName}}</view>
						<view class="phone">{{addAct.contactsPhone}}</view>
						<view class="add">{{addAct.province}}{{addAct.city}}{{addAct.region}}{{addAct.address}}</view>
					</view>
					<image src="/static/images/r-arrow.png" class="fr" mode="widthFix"></image>
				</view>
			</view>
			<!-- 上门时间 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					上门时间
					<image src="/static/images/r-arrow.png" mode="widthFix" class="fr"></image>
					<BiaofunDatetimePicker class="fr" placeholder="请选择日期时间" start="2000-01-01" end="2100-01-01" fields="minute" @change="changeDatetimePicker"></BiaofunDatetimePicker>
				</view>
			</view>
			<!-- 员工 -->
			<view class="title clearfix"  @click="open_saff">
				请选择服务员工
				<image src="/static/images/r-arrow.png" mode="widthFix" class="fr"></image>
				<text class="fr" v-if="saffAct">{{saffAct.name}}</text>
			</view>
			<!-- 服务次数 -->
			<view class="time-pick">
				<view class="title uni-input clearfix">
					服务次数
					<text class="fr">*{{entBizs.univalenceUnit}}</text>
					<input type="number" @blur="timeZero" v-model="safftime" class="fr"/>
				</view>
			</view>
			<view class="time-pick">
				<view class="title uni-input clearfix">
					服务价格
					<text class="fr">{{(safftime * entBizs.univalence).toFixed(2)}}</text>
				</view>
			</view>
			<view class="requirement">
				<view>备注：</view>
				<input type="text" value="" placeholder="请输入" v-model="remarks"/>
			</view>
		</view>
		
		<!-- 去支付 -->
		<view v-if="modify" class="padd_32">
			<view class="address">
				<view class="title">服务地址</view>
				<view class="cont clearfix">
					<view class="fl">
						<view class="name">{{addAct.contactsName}}</view>
						<view class="phone">{{addAct.contactsPhone}}</view>
						<view class="add">{{addAct.province}}{{addAct.city}}{{addAct.region}}{{addAct.address}}</view>
					</view>
					<image src="/static/images/r-arrow.png" class="fr" mode="widthFix"></image>
				</view>
			</view>
			<view class="title uni-input clearfix">
				上门时间
				<text class="fr">{{detail.appointmentDatetime == null ? '暂无预约时间' : detail.appointmentDatetime}}</text>
			</view>
			<view class="title uni-input clearfix">
				服务类型
				<text class="fr" v-if="detail.business">{{detail.business.name}}</text>
			</view>
			<view class="title uni-input clearfix">
				服务次数
				<text class="fr">{{detail.amount}}*{{detail.univalence}}{{detail.univalenceUnit}}</text>
			</view>
			<view class="discount">
				<!-- <view class="coupon clearfix" @click="open">
					优惠卷
					<image src="/static/images/r-arrow.png" class="fr" mode="widthFix"></image>
					<text v-if="ticket.canuse" class="fr" :data-id="ticket_pri.id">
						<text>{{ ticket_pri.id == '' ? ticket.canuse.length : ticket_pri.pri }}{{ ticket_pri.id == '' ? '张优惠券' : '可抵扣' }}</text>
					</text>
					<view v-else class="fr">暂无优惠券</view>
				</view>
				<view class="share clearfix">
					分享金可抵扣（{{balances.brokerage}}元）
					<view class="input">
						<input style="border: gray 1rpx solid;border-radius: 10rpx;height: 60rpx;margin-top: 10rpx;" type="digit" placeholder="请输入分享金" @input="getShare" v-model="share"/>
					</view>
				</view>
				<view class="share clearfix">
					余额剩余可支付（{{balances.balances}}元）
					<view class="input">
						<input style="border: gray 1rpx solid;border-radius: 10rpx;height: 60rpx;margin-top: 10rpx;" type="digit" placeholder="请输入余额" @input="getSurplus" v-model="surplus"/>
					</view>
				</view> -->
				
			</view>
			<view class="pay clearfix">
				总金额：
				<text class="fr">RMB ¥{{ detail.price }}</text>
				<!-- <text class="fr" v-if="detail.typeId==1">RMB ¥{{ detail.price.toFixed(2) }}</text> -->
				<!-- <text class="fr" v-if="detail.statusId==3">RMB ¥{{ (prepaidPrice-share-surplus)>0?((prepaidPrice-share-surplus)).toFixed(2):'0.00' }}</text> -->
				<!-- <text class="fr" v-else-if="detail.statusId==6">RMB ¥{{ (payTwo-share-surplus)>0?(payTwo-share-surplus).toFixed(2):'0.00' }}</text> -->
				<!-- <text class="fr" v-else-if="detail.statusId==5">RMB ¥{{ (payTwo-share-surplus)>0?(payTwo-share-surplus).toFixed(2):'0.00' }}</text> -->
			</view>
			<!-- <view class="share clearfix" v-if="detail&&detail.business&&detail.typeId==2"> -->
			<view class="share clearfix">
				预支付：
				<text class="fr" style="color: #FCC800;">¥{{ detail.price*detail.business.prepaid/100}}</text>
				<!-- <text class="fr" style="color: #FCC800;" v-else>¥{{ (prepaidPrice-share-surplus)>0?(prepaidPrice-share-surplus).toFixed(2):'0.00' }}</text> -->
			</view>
			<view class="requirement">
				<view>备注：</view>
				<input type="text" disabled="true" :value="detail.comments"/>
				<view class="hei_100">
					
				</view>
			</view>
		</view>
		<!-- end -->

		
		<!-- 支付尾款 -->
		
		
		
		<!-- 按钮 -->
		<view class="btn" v-if="fast" @click="fastpay">确认下单</view>
		<view class="btn" v-if="meal" @click="mealpay">确认下单</view>
		<view class="btn" v-if="staff" @click="staffpay">确认下单</view>
		<view class="btn" v-if="business" @click="businesspay">确认下单</view>
		<view class="btn" v-if="modify" @click="modifypay">确认付款</view>
		<!-- end -->

		<!-- 优惠券弹窗 -->
		<uni-popup ref="popup" type="center">
			<view class="public-tick">
				<!-- 头部 -->
				<!-- #ifndef MP-WEIXIN -->
				<view class="padd_32 header clearfix">
					<view class="fl"><image class="fl" src="/static/images/back.png" mode="widthFix" @click="$refs.popup.close()"></image></view>
					卡券选择
				</view>
				<view class="hei_100"></view>
				<!-- #endif -->
				<view class="top" v-if="!(this.detail.statusId!=3 || _this.ticket.canuse.length == 0 || undefined)" @click="close">
					<view style="margin-left: 20rpx;">不使用优惠劵</view>
					<view class="fl"><image class="fl" src="/static/images/middle_icon_next@2x.png" mode="widthFix"></image></view>
				</view>
				<!-- end -->
				<scroll-view scroll-y class="adds_list">
					<!-- 优惠券列表 -->
					<view style="margin-bottom: 100rpx;" class="list padd_32" v-if="ticket&&ticket.canuse">
						<view v-for="(item, index) in ticket.canuse" :key='index' class="clearfix" :class="ticket_index + '' === index + '' ? 'canuse-act' : ''" @click="ticket_act(item.id,item.limitation, item.price, index)">
							<view class="fl canuse-body1">
								<view class="title">{{item.enterpriseName||'通用优惠券'}}</view>
								<view class="time">{{item.endDatetime}}到期</view>
								<view class="time">剩余可用：{{item.count}}张</view>
							</view>
							<view class="fl canuse-body2">
								<view style="margin-top: 20rpx;">减<text style="font-size: 60rpx;font-weight: 500;">{{item.price}}</text></view>
								<view>满{{item.limitation}}</view>
							</view>
							<image class="fr" style="width: 32rpx;height:28rpx;margin: 60rpx 15rpx 0 0;" :src="ticket_index + '' === index + '' ? '/static/images/button_check_selected.png' : '/static/images/button_check_normal.png'" mode="widthFix"></image>
							<!-- <image class="fr" style="width: 32rpx;height:28rpx;margin: 60rpx 15rpx 0 0;" :src="_this.ticket_index + '' === _this.index + ''  ? '/static/images/button_check_selected.png' : '/static/images/button_check_normal.png'" mode="widthFix"></image> -->
						</view>
					</view>
					<!-- end -->
				</scroll-view>
				<!-- 按钮 -->
				<view class="btn">
					<view @click="$refs.popup.close()" v-if=" _this.ticket.canuse.length == 0 || undefined ">关闭</view>
					<!-- <view @click="select" >确认</view> -->
					<view @click="select" v-else>确认</view>
				</view>
				<!-- end -->
			</view>
		</uni-popup>
		<!-- end -->

		<!-- 地址弹窗 -->
		<uni-popup ref="popup_adds" type="center">
			<view class="public-tick">
				<!-- 头部 -->
				<!-- #ifndef MP-WEIXIN -->
				<view class="padd_32 header clearfix">
					<view class="fl"><image class="fl" src="/static/images/back.png" mode="widthFix" @click="close_adds"></image></view>
					地址选择
				</view>
				<view class="hei_100"></view>
				<!-- #endif -->
				<!-- end -->

				<!-- 地址列表 -->
				<scroll-view scroll-y class="adds_list">
					<view class="list padd_32">
						<view class="list clearfix" v-for="(item, index) in address" :class="addAct.id == item.id ? 'act' : ''" :key="item.index" @click="adds_act(index)">
							<!-- <view class="fl">
								<view class="dot bg_5EBEFF"></view>
								<view>默认地址</view>
							</view> -->
							<view class="fr">
								<view class="name clearfix">
									{{item.contactsName}}
									<!-- <text class="delete fr" :data-id='item.id' @click="del_add">删除</text>
									<text class="edit fr" :data-id='item.id' @click="chang_add">编辑</text> -->
								</view>
								<view class="phone">{{item.contactsPhone}}</view>
								<view>{{item.province}}{{item.city}}{{item.region}}{{item.address}}</view>
							</view>
						</view>
					</view>
				</scroll-view>
				<!-- end -->

				<!-- 按钮 -->
				<!-- <navigator url="/pages/personal/address/add"><view class="btn"><view>添加新地址</view></view></navigator> -->
				
				<!-- end -->
			</view>
		</uni-popup>
		<!-- end -->
		
		<!-- 员工弹窗 -->
		<uni-popup ref="popup_saff" type="center">
			<view class="public-tick">
				<!-- 头部 -->
				<!-- #ifndef MP-WEIXIN -->
				<view class="padd_32 header clearfix">
					<view class="fl"><image class="fl" src="/static/images/back.png" mode="widthFix" @click="close_saff"></image></view>
					员工选择
				</view>
				<view class="hei_100"></view>
				<!-- #endif -->
				<!-- end -->
		
				<!-- 员工列表 -->
				<scroll-view scroll-y class="adds_list">
					<view class="list clearfix padd_32">
						<view class="list_saff fl" v-for="(item, index) in employees" :class="saffAct.id == item.id ? 'act' : ''" :key="item.index" @click="saff_act(index)">
							<image :src="item.portrait" mode="aspectFill" class="fl"></image>
							<view class="fl">
								<view class="name">{{item.name}}</view>
								<uni-rate active-color="#FCC800" max="5" is-fill="false" size="11" disabled="true" :value="item.score"></uni-rate>
								<view>{{item.age}}岁</view>
								<view>{{item.nativePlace}}人</view>
							</view>
						</view>
					</view>					
				</scroll-view>
				<!-- end -->
		
				<!-- 按钮 -->
				<!-- <navigator url="/pages/personal/address/add"><view class="btn"><view>添加新地址</view></view></navigator> -->
				
				<!-- end -->
			</view>
		</uni-popup>
		<!-- end -->
	</view>
</template>

<script>
import uniPopup from '@/components/uni-popup/uni-popup.vue';
import UniRate from '@/components/uni-rate/uni-rate.vue'
import BiaofunDatetimePicker from '@/components/biaofun-datetime-picker/biaofun-datetime-picker.vue';
import wInput from '@/components/button/watch-input.vue'; //input
import { mapState, mapMutations } from 'vuex';
export default {
	computed: mapState(['hasLogin', 'uerInfo']),
	components: {
		wInput,
		uniPopup,
		BiaofunDatetimePicker,
		UniRate
	},
	props: {
		fast: false,
		staff: false,
		meal: false,
		business:false,
		modify:false,
		detail: '',
		ticket: '',
		entBizs:''
	},
	data() {
		return {
			shareValue: '',
			surplusValue: '',
			prepaidPrice: 0,
			payTwo: 0,
			payType: 'ban',
			title: '卡券选择',
			surplus: '',
			time: '',
			ticket_index: '',
			tickets: {
				pri: '',
				id: '',
				index: '',
				description: ''
			},
			ticket_pri: {
				pri: '',
				id: '',
				index: '',
				description: ''
			},
			list: [],
			payPrice: 0,
			price: '',
			minPrice: '',
			maxPrice: '',
			share: '',
			lebelname:[], //业务
			employees: [],
			price_pay: '',
			meal_price: 0,
			labshow:false,
			showAct:{
				name:'',
				bue:'',
				pri:'',
				id:'',
				min: '',
				max: '',
				num: ''
			},
			saffPri:'',
			busspri:'',
			showbue:'',
			tabCur: 'all',
			address: [],
			addAct:{
				address: '',
				city: '',
				contactsName: '',
				contactsPhone: '',
				createDatetime: '',
				id: '',
				province: '',
				region: '',
				userId: '',
			},
			saffAct:'',
			safftime:1,
			pay_e:'0',
			remarks:'',
			balances:{
				brokerage: 0,
				balances: 0,
			},
			prepaid: 100,
			dateStr:''
		};
	},
	watch:{
		safftime(val){
			var _this = this
			console.log(val)
			if(val){
				_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
				if(_this.business){
					_this.busspri = (_this.entBizs.univalence * _this.safftime).toFixed(2)
					console.log(_this.busspri)
				}
				console.log("_this.saffPri",_this.saffPri)
			}else{
				_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
				console.log(_this.saffPri)
				if(_this.business){
					_this.busspri = (_this.entBizs.univalence * _this.safftime).toFixed(2)
					console.log(_this.busspri)
				}
			}
		}
		// ,
		// pay_e(val){
		// 	var _this = this
		// 	console.log(val)
		// 	if(val){
		// 		_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
		// 		if(_this.business){
		// 			_this.busspri = (_this.entBizs.univalence * _this.safftime).toFixed(2)
		// 		}
		// 	}else{
		// 		_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
		// 		if(_this.business){
		// 			_this.busspri = (_this.entBizs.univalence * _this.safftime).toFixed(2)
		// 		}
		// 	}
		// }
	},
	created() {
		var _this = this;
		if (_this.modify) {
			if (_this.detail&&_this.detail.business) {
				if (_this.detail.typeId==1) {
					_this.prepaid = 100
				} else {
					_this.prepaid = _this.detail.business.prepaid
					}
				if ( _this.detail.coupons && _this.detail.coupons.price) {
					_this.ticket_pri.description = _this.detail.coupons.description
					_this.ticket_pri.pri = _this.detail.coupons.price
					_this.ticket_pri.id = _this.detail.coupons.id
					console.log(_this.ticket_pri.id,"")
					_this.prepaidPrice = Math.floor(((_this.detail.price - _this.detail.coupons.price) > 0 ? _this.detail.price - _this.detail.coupons.price : 0)*_this.prepaid)/100
					_this.payTwo = Math.floor(((_this.detail.price - _this.detail.coupons.price) > 0 ? _this.detail.price - _this.detail.coupons.price : 0)* (100-_this.prepaid).toFixed(2))/100
					console.log('预支付',_this.prepaidPrice)
				} else {
					_this.prepaidPrice = Math.floor(_this.detail.price*_this.prepaid)/100
					_this.payTwo = _this.detail.price - _this.detail.prepaidPrice
					_this.payTwo = _this.detail.price*1 - _this.detail.prepaidPrice*1 - (_this.detail.usedBalances||0)*1 - (_this.detail.usedBrokerage||0)*1
				}
			}
		}
		// 服务类型
		if (_this.hasLogin && _this.staff) {
			_this.lebelname = _this.detail.employeeBusinessMaps
			console.log(_this.detail.employeeBusinessMaps)
			if (_this.detail.id) {
				for (let i = 0; i < _this.lebelname.length; i++) {
					if (_this.detail.id==_this.lebelname[i].businessId) {
						_this.showAct.name = _this.lebelname[i].businessName
						_this.showAct.bue = _this.lebelname[i].univalenceUnit
						_this.showAct.pri = _this.lebelname[i].univalence
						_this.showAct.id = _this.lebelname[i].businessId
						_this.showAct.num = _this.lebelname[i].minCount
						_this.safftime = _this.lebelname[i].minCount
						_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
						break
					}
				}
			} else {
				_this.showAct.name = _this.lebelname[0].businessName
				_this.showAct.bue = _this.lebelname[0].univalenceUnit
				_this.showAct.pri = _this.lebelname[0].univalence
				_this.showAct.id = _this.lebelname[0].businessId
				_this.showAct.num = _this.lebelname[0].minCount
				_this.safftime = _this.lebelname[0].minCount
				_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
			}
		}
		if (_this.hasLogin && _this.fast) {
			_this.$http
				.get('/business/select/tombstone')
				.then(function(response) {
					_this.list = response.data
				})
				.catch(function(error) {
					console.log(error);
				});
		}
		if (_this.meal) {
			setTimeout(function() {
				_this.meal_price = _this.detail.price
				console.log('价格',_this.meal_price,_this.detail)
			}, 10);
		}
		// 分享金
		if (_this.hasLogin) {
			_this.$http
				.get('/personal/center/getbrokerageandbalances/' + this.uerInfo.userId)
				.then(function(response) {
					_this.balances.balances = response.data.balances || 0
					_this.balances.brokerage = response.data.brokerage || 0
				})
				.catch(function(error) {
					console.log(error);
				});
		}
		// 地址
		var _this = this;
		if (this.hasLogin && !this.meal) {
			_this.$http
				.get('/personal/center/getaddresslist/' + this.uerInfo.userId)
				.then(function(response) {
					_this.address = response.data;
					if (_this.address.length) {
						_this.addAct = _this.address[0]
					}
				})
				.catch(function(error) {
					console.log(error);
				});
		}
		else{
			_this.price = _this.detail.price
		}
		if (_this.hasLogin && _this.business) {
			_this.$http.post('/emp/info/query', {
				userId: _this.uerInfo.userId,
				enterpriseId: _this.detail.shopId,
				page: 1,
				size: 99999,
				status: ''
			}).
			then(function(response) {
				if (response.success) {
					_this.employees = response.data.list||[]
					_this.saffAct = _this.employees[0]
					_this.showAct.name = _this.entBizs.business.name
					_this.showAct.bue = _this.entBizs.univalenceUnit
					_this.showAct.pri = _this.entBizs.univalence
					_this.showAct.id = _this.entBizs.businessId
				}
			}).catch(function(error) {
				console.log(error);
			});
			_this.busspri = (_this.entBizs.univalence * _this.safftime).toFixed(2)
		}
	},
	methods: {
		getNum(k,val) {
			console.log(6666)
			console.log(k, val)
			let num = k*val
			return val
		},
		getShare(e) {
			let _this = this
			let value = e.detail.value*1
			let money = ''
			if (value > this.balances.brokerage) {
				_this.share = this.balances.brokerage
				return
			}
			// 判断是否为小数且小数位数超过3的自动进行四舍五入
			if (String(value).indexOf(".")>-1 && (String(value).length-String(value).indexOf(".")-1)>2) {
				value = value.toFixed(2)
			}
			if (this.detail.statusId==6) {
				money = this.payTwo - (value || 0) - (this.surplus || 0)
				if (money < 0) {
					this.$nextTick(function () {
						_this.share = _this.payTwo - (_this.surplus || 0)
					})
				} else {
					this.$nextTick(function () {
						_this.share = value
					})
				}
			} else {
				money = this.prepaidPrice - (value || 0) - (this.surplus || 0)
				if (money < 0) {
					this.$nextTick(function () {
						_this.share = _this.prepaidPrice - (_this.surplus || 0)
					})
				} else {
					this.$nextTick(function () {
						_this.share = value
					})
				}
			}
		},
		getSurplus(e) {
			let _this = this
			let value = e.detail.value*1
			let money = ''
			if (value > this.balances.balances) {
				_this.share = this.balances.balances
				return
			}
			// 判断是否为小数且小数位数超过3的自动进行四舍五入
			if (String(value).indexOf(".")>-1 && (String(value).length-String(value).indexOf(".")-1)>2) {
				value = value.toFixed(2)
			}
			if (this.detail.statusId==6) {
				money = this.payTwo - (this.share || 0) - (value || 0)
				if (money < 0) {
					this.$nextTick(function () {
						_this.surplus = (_this.payTwo - (_this.share || 0)*1).toFixed(2)
					})
				} else {
					this.$nextTick(function () {
						_this.surplus = value
					})
				}
			} else {
				money = ((this.prepaidPrice - (this.share || 0) - (value || 0))*1).toFixed(2)
				if (money < 0) {
					this.$nextTick(function () {
						_this.surplus = (_this.prepaidPrice - (_this.share || 0)*1).toFixed(2)
					})
				} else {
					this.$nextTick(function () {
						_this.surplus = value
					})
				}
			}
		},
		timeZero(){
			var _this = this
			if(this.safftime == ''){
				this.safftime = 0
			}
			// if (this.showAct.num) {
			// 	if (this.safftime < this.showAct.num) {
			// 		this.safftime = this.showAct.num
			// 	}
			// }
		},
	
		modifypay() {
			var _this = this;
			let money =  _this.detail.price*_this.detail.business.prepaid/100
			console.log(money,"预付金money")
			// if (_this.detail.statusId==6) {
			// 	money = _this.payTwo - _this.share - _this.surplus
			// }
			// money = (money*1).toFixed(2)
			if (money>0) {
				uni.navigateTo({
					url: '/pageageA/pages/balance/addmoney?type=预付款&orderId=' + _this.detail.id + '&money=' + money + '&couponsId=' + _this.ticket_pri.id + '&usedBrokerage=' + _this.share + '&usedBalances=' + _this.surplus
				})
			} else {
				_this.$http.post('/order/payorder/ban',{
					orderId:_this.detail.id,
					cashWaitPay: 0,
					couponsId: _this.ticket_pri.id,
					usedBrokerage: _this.share,
					usedBalances: _this.surplus,
				}).
				then(function (val) {
					if (val.success) {
						uni.showToast({
							title: '支付成功',
							icon:"none"
						})
						setTimeout(function() {
							_this.$Router.back()
						}, 1000);
					} else {
						uni.showToast({
							title: val.msg,
							icon:"none"
						})
					}
				}).catch(function (error) {
					console.log(error);
				});
			}
		},
		ticket_act(id, min, pri, index) {
			var _this = this;
			// 判断是否允许点击
			if ( _this.ticket.canuse.length == 0 || undefined) {
				return
			}
			if (_this.detail.price<min) {
				uni.showToast({
				    title: '本订单金额不足满减数',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			_this.tickets.pri = pri;
			_this.tickets.id = id;
			_this.tickets.index = index
			_this.ticket_index = index
			// this.$refs.popup.close();
		},
		select() {
			let _this = this
			let pri = _this.tickets.pri;
			_this.ticket_pri.pri = _this.tickets.pri;
			_this.ticket_pri.id = _this.tickets.id;
			_this.ticket_pri.index = _this.tickets.index;
			_this.ticket_index = _this.tickets.index;
			_this.price_pay = (_this.price - _this.ticket_pri.pri).toFixed(2);
			_this.prepaidPrice = Math.floor(((_this.detail.price - pri - _this.surplus - _this.share) > 0 ? _this.detail.price - pri - _this.surplus - _this.share : 0)*_this.prepaid)/100
			_this.payTwo = _this.detail.price - _this.detail.prepaidPrice
			this.$refs.popup.close();
		},
		fastpay(){
			var _this = this;
			if (_this.address=='') {
				uni.showToast({
					title: '请选择服务地址',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.time=='') {
				uni.showToast({
					title: '请选择上门时间',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.showAct.id + ''==='') {
				uni.showToast({
					title: '请选择服务类型',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.safftime<1) {
				uni.showToast({
					title: '服务的次数不能小于1',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.safftime<_this.showAct.num) {
				uni.showToast({
					title: '服务的次数最小为'+_this.showAct.num,
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.maxPrice=='') {
				uni.showToast({
					title: '请输入最高价格',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.minPrice*1 > _this.maxPrice*1) {
				uni.showToast({
					title: '最高价格不能低于最低价格',
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.minPrice+''==='' || _this.minPrice< _this.showAct.min*_this.safftime) {
				uni.showToast({
					title: '最低价格不能低于'+ (_this.showAct.min*_this.safftime).toFixed(2),
					duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.maxPrice*1 > _this.showAct.max*_this.safftime) {
				uni.showToast({
					title: '最高价格不能超过'+ (_this.showAct.max*_this.safftime).toFixed(2),
					duration: 1000,
					icon: 'none'
				})
				return
			}
			uni.showModal({
			    title: '',
			    content: '确定下单？',
			    success: function (res) {
			        if (res.confirm) {
			            _this.$http
						.post('/user/order/createorder',{
							typeId:1,
							businessId:_this.showAct.id,
							enterpriseId:'',
							employeeId:'',
							userId:_this.uerInfo.userId,
							price:_this.saffPri,
							minPrice:_this.minPrice,
							maxPrice:_this.maxPrice,
							contactsPhone:_this.addAct.contactsPhone,
							contactsName:_this.addAct.contactsName,
							province:_this.addAct.province,
							city:_this.addAct.city,
							region:_this.addAct.region,
							address:_this.addAct.address,
							appointmentDatetime:_this.time,
							comments:_this.remarks,
							amount:_this.safftime,
							univalence:_this.showAct.pri,
							client:'MP-WEIXIN',
							univalenceUnit: _this.showAct.bue
						})
						.then(function(response) {
							if(response.success){
								uni.showToast({
									title: response.msg,
									duration: 1000,
									icon: 'none'
								})
								setTimeout(function(){
									uni.switchTab({
									    url: '/pages/order/index'
									})
									},500)
								_this.showAct.name = ''
								_this.showAct.pri = ''
								_this.showAct.blue = ''
								_this.maxPrice = ''
								_this.minPrice = ''
								_this.remarks = ''
								_this.showAct.num = 1
								_this.safftime = 1
								_this.showAct.min = ''
								_this.showAct.max = ''
							} else {
								let title = '订单创建失败'
								if (response.msg) {
									title = response.msg
								}
								if (response.data&&response.data.length>0&&response.data[0].defaultMessage) {
									title = response.data[0].defaultMessage
								}
								uni.showToast({
									title: title,
									duration: 1000,
									icon: 'none'
								})
								return
							}
						})
						.catch(function(error) {
							console.log(error);
						});
			        } else if (res.cancel) {
			            console.log('用户点击取消');
			        }
			    }
			})
		},
		mealpay(){
			var _this = this;
			if (_this.surplus < 0) {
				uni.showToast({
				    title: '余额不能低于0',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.share < 0) {
				uni.showToast({
				    title: '分享金不能小于0',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.surplus > _this.balances.balances) {
				uni.showToast({
				    title: '余额不足',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.share > _this.balances.brokerage) {
				uni.showToast({
				    title: '分享金不足',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.surplus*1 + _this.share*1 > _this.detail.price) {
				uni.showToast({
				    title: '输入的金额超过价格',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			let money = _this.detail.price - _this.surplus*1 - _this.share*1
			if (money>0) {
				uni.navigateTo({
					url: '/pageageA/pages/balance/addmoney?type=买套餐&id=' + _this.detail.id + '&money=' + money + '&usedBrokerage=' + _this.share + '&usedBalances=' + _this.surplus
				})
			} else {
				_this.$http
					.post('/package/purchasepacakge/'+_this.payType, {
						userId:_this.uerInfo.userId,
						id:_this.detail.id,
						payPrice: money,
						usedBalances:_this.surplus||0,
						usedBrokerage:_this.share||0
					})
					.then(function(response) {
						if(response.success){
							// uni.navigateTo({
							//     url: '/pages/personal/meal/index'
							// })
							uni.showToast({
								title: '支付成功',
								icon:"none"
							})
							setTimeout(function() {
								_this.$Router.back()
							}, 1000);
						}
						 else {
							uni.showToast({
								title: response.msg,
								duration: 1000,
								icon: 'none'
							})
						}
					})
					.catch(function(error) {
						console.log(error);
					});
			}
			
		},
		staffpay(){
			console.log('staffpay')
			var _this = this
			if (_this.addAct.address=='') {
				uni.showToast({
				    title: '请选择服务地址',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.time=='') {
				uni.showToast({
				    title: '请选择上门时间',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.safftime=='') {
				uni.showToast({
				    title: '请选择服务次数',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.safftime<_this.showAct.num) {
				uni.showToast({
					title: '服务的时间最小为'+_this.showAct.num,
					duration: 1000,
					icon: 'none'
				})
				return
			}
			_this.$http
				.post('/user/order/createorder',{
					typeId:2,
					businessId:_this.showAct.id,
					enterpriseId: _this.detail.emp.enterpriseId,
					employeeId:_this.detail.emp.id,
					userId:_this.uerInfo.userId,
					price:_this.saffPri,
					contactsPhone:_this.addAct.contactsPhone,
					contactsName:_this.addAct.contactsName,
					province:_this.addAct.province,
					city:_this.addAct.city,
					region:_this.addAct.region,
					address:_this.addAct.address,
					appointmentDatetime:_this.time,
					comments:_this.remarks,
					amount:_this.safftime,
					univalence:_this.showAct.pri,
					client:'MP-WEIXIN',
					univalenceUnit: _this.showAct.bue
				})
				.then(function(response) {
					if(response.success){
						uni.showToast({
							title: response.msg,
							duration: 1000,
							icon: 'none'
						})
						setTimeout(function(){
							uni.switchTab({
							    url: '/pages/order/index'
							})
							},500)
					} else {
						let title = '订单创建失败'
						if (response.msg) {
							title = response.msg
						}
						if (response.data&&response.data.length>0&&response.data[0].defaultMessage) {
							title = response.data[0].defaultMessage
						}
						uni.showToast({
						    title: title,
						    duration: 1000,
							icon: 'none'
						})
						return
					}
				})
				.catch(function(error) {
					console.log(error);
				});
		},
		businesspay(){
			var _this = this
			if (_this.address=='') {
				uni.showToast({
				    title: '请选择服务地址',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.time=='') {
				uni.showToast({
				    title: '请选择上门时间',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.saffAct.id == '') {
				uni.showToast({
				    title: '请选择员工',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			if (_this.amount < 1) {
				uni.showToast({
				    title: '请输入服务次数',
				    duration: 1000,
					icon: 'none'
				})
				return
			}
			// if (_this.remarks=='') {
			// 	uni.showToast({
			// 	    title: '请输入备注',
			// 	    duration: 1000,
			// 		icon: 'none'
			// 	})
			// 	return
			// }
			_this.$http
				.post('/order/createorder',{
					typeId:2,
					businessId:_this.entBizs.businessId,
					enterpriseId: _this.detail.shopId,
					employeeId:_this.saffAct.id,
					userId:_this.uerInfo.userId,
					contactsPhone:_this.addAct.contactsPhone,
					contactsName:_this.addAct.contactsName,
					province:_this.addAct.province,
					city:_this.addAct.city,
					region:_this.addAct.region,
					address:_this.addAct.address,
					appointmentDatetime:_this.time,
					comments:_this.remarks,
					amount:_this.safftime,
					price:_this.busspri,
					univalence:_this.entBizs.univalence,
					client:'MP-WEIXIN',
					univalenceUnit: _this.showAct.bue
				})
				.then(function(response) {
					if(response.success){
						uni.switchTab({
						    url: '/pages/order/index'
						})
					} else {
						let title = '订单创建失败'
						if (response.msg) {
							title = response.msg
						}
						if (response.data&&response.data.length>0&&response.data[0].defaultMessage) {
							title = response.data[0].defaultMessage
						}
						uni.showToast({
						    title: title,
						    duration: 1000,
							icon: 'none'
						})
						return
					}
				})
				.catch(function(error) {
					console.log(error);
				});
		},
		tabSelect(e) {
			var _this = this;
			_this.tabCur = e.target.dataset.id;
			_this.labshow = false;
			_this.showAct.name = e.target.dataset.type
			_this.showAct.bue = e.target.dataset.bue
			_this.showAct.pri = e.target.dataset.pri
			_this.showAct.min = e.target.dataset.min
			_this.showAct.max = e.target.dataset.max
			_this.showAct.num = e.target.dataset.num
			_this.safftime = e.target.dataset.num || 1
			_this.showAct.id = e.target.dataset.id
			_this.saffPri = (_this.showAct.pri * _this.safftime).toFixed(2)
			// console.log(_this.showAct.pri, _this.safftime)
			console.log((_this.safftime*_this.showAct.min).toFixed(2),"safftime*showAct.min).toFixed(2)")
			console.log((_this.safftime*_this.showAct.max).toFixed(2),"console.log(")
			_this.minPrice = (_this.safftime*_this.showAct.min).toFixed(2)
			_this.maxPrice = (_this.safftime*_this.showAct.max).toFixed(2)
		},
		labShow(){
			var _this = this
			_this.labshow = !_this.labshow
		},
		bindTimeChange: function(e) {
			this.time = e.target.value;
		},
		open() {
			var _this = this;
			_this.ticket_index = ''
			for (let i = 0; i < _this.ticket.canuse.length; i++) {
				console.log( _this.ticket.canuse,"===")
				// if (_this.detail.coupons.id == _this.ticket.canuse[i].id) {
				// 	_this.ticket_index = i
				// 	break
				// }
				if (_this.ticket.canuse[i].id) {
					_this.ticket_index = i
					break
				}
			}
			//判断是否允许点击
			// if (this.detail.statusId!=3 || _this.ticket.canuse.length == 0 || undefined) {
			// 	return
			// } else {
				if (this.ticket_index !== '') {
					let query = this.ticket.canuse[this.ticket_index]
					this.ticket.canuse.splice(this.ticket_index, 1)
					this.ticket.canuse.unshift(query)
					this.ticket_index = 0
				}
				_this.$refs.popup.open();
			// }
		},
		open_time() {
			var _this = this;
			_this.$refs.popup_time.open();
		},
		open_adds() {
			var _this = this;
			if(!this.hasLogin){
				uni.showModal({
					title: '温馨提示',
					content: '此时此刻需要您登录喔~',
					confirmText: "去登录",
					cancelText: "再逛会",
					success: res2 => {
						// loginPopupNum--;
						if (res2.confirm) {
							uni.navigateTo({
								url:"/pages/register/login",
								// url:"/pageageA/index/index.vue",
							});
						}
					}
				});
			}else if (_this.address.length) {
				_this.$refs.popup_adds.open();
			} else {
				_this.$http
				.get('/personal/center/getaddresslist/' + this.uerInfo.userId)
				.then(function(response) {
					_this.address = response.data;
					if (_this.address.length) {
						_this.addAct = _this.address[0]
						_this.$refs.popup_adds.open();
					} else {
						uni.navigateTo({
							url: '/pageageA/pages/address/add'
						})
					}
				})
				.catch(function(error) {
					console.log(error);
				})
			}
		},
		open_saff() {
			var _this = this;
			_this.$refs.popup_saff.open();
		},
		close() {
			let _this = this
			_this.ticket_pri.description = '';
			_this.ticket_pri.pri = '';
			_this.ticket_pri.id = '';
			_this.ticket_pri.index = '';
			_this.ticket_index = ''
			_this.price_pay = (_this.price - _this.ticket_pri.pri).toFixed(2);
			_this.prepaidPrice = Math.floor(((_this.detail.price - _this.surplus - _this.share) > 0 ? _this.detail.price - _this.surplus - _this.share : 0)*_this.prepaid)/100
			_this.payTwo = _this.detail.price - _this.detail.prepaidPrice - _this.surplus - _this.share
			this.$refs.popup.close();
		},
		close_adds(){
			this.$refs.popup_adds.close();
		},
		close_saff(){
			this.$refs.popup_saff.close();
		},
		adds_act(index){
			var _this = this;
			_this.addAct = _this.address[index]
			this.$refs.popup_adds.close();
		},
		saff_act(index){
			var _this = this;
			_this.saffAct = _this.employees[index]
			this.$refs.popup_saff.close();
		},
		changeDatetimePicker(date) {
			this.time = date.fmt3 + ":00";
		},
		purchasepacakge() {
			var _this = this;
			_this.$http
				.post('/package/purchasepacakge', {
					// userid:,
					// packageid:,
					// paycash:,
					// enterpriseid:,
					// subject:,
					// payeerole:,
					// brokerage:,
					// returnurl:
				})
				.then(function(response) {
					console.log('个人信息', response);
					_this.details = response.data;
				})
				.catch(function(error) {
					console.log(error);
				});
		}
	}
};
</script>

<style scoped lang="scss">
.input{
	width: 36%;
	float: right;
}
.main-input{
	border: none !important;
	height: 80rpx !important;
	line-height: 80rpx !important;
}
.public-order {
	padding-bottom: 30rpx;
}
.title {
	height: 100rpx;
	line-height: 100rpx;
	font-size: 32rpx;
	color: #333;
	border-bottom: 1rpx solid #d0d0d0;
	margin-top: 16rpx;
}
.title text {
	font-size: 26rpx;
}
.title image {
	width: 16rpx;
	margin-top: 38rpx;
	margin-left: 10rpx;
}
.title .down {
	width: 30rpx;
}
.title input{
	border: 1rpx solid #999;
	height: 40rpx;
	line-height: 40rpx;
	width: 80rpx;
	padding: 4rpx;
	padding-left: 10rpx;
	margin-top: 26rpx;
	margin-right: 10rpx;
	font-size: 26rpx;
}
.lebel {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	padding-top: 30rpx;
}
.lebel text {
	display: block;
	width: 218rpx;
	height: 66rpx;
	background: #f6f6f7;
	border-radius: 10rpx;
	font-size: 26rpx;
	line-height: 66rpx;
	text-align: center;
	font-size: #666;
	margin-left: 8rpx;
	margin-bottom: 30rpx;
}
.lebel .act {
	background: #fff;
	border: 1rpx solid $uni-color1;
	color: $uni-color1;
}
.canuse-act{
	background: #fff;
	border: 1rpx solid #21E416;
	color: $uni-color1;
}
.address{
	width: 100%;
	min-height: 200rpx;
}
.address .title {
	border: 0 none;
	height: 70rpx;
	line-height: 70rpx;
}
.address .cont {
	font-size: 26rpx;
	color: #333;
}
.address .cont view {
	margin-bottom: 10rpx;
	width: 648rpx;
}
.address .cont .phone {
	color: #666;
}
.address .cont .add {
	color: #999;
	font-size: 24rpx;
}
.address .cont image {
	width: 16rpx;
	margin-top: 40rpx;
}
.discount {
	/* margin-bottom: 46rpx; */
	overflow: hidden;
}
.discount view {
	height: 80rpx;
	line-height: 80rpx;
	color: #999;
	font-size: 26rpx;
}
.discount image {
	width: 14rpx;
	margin-top: 28rpx;
	margin-left: 10rpx;
}
.discount text {
	color: #333;
}
.payment view {
	font-size: 48rpx;
	color: $uni-color1;
	height: 88rpx;
	line-height: 88rpx;
}
.payment input {
	display: inline-block;
	color: $uni-color1;
	font-size: 48rpx;
	height: 88rpx;
	line-height: 88rpx;
	padding-left: 20rpx;
	width: 610rpx;
}
.payment .tit {
	font-size: 32rpx;
	color: #333;
	line-height: 90rpx;
	height: 90rpx;
}
.payment .tit text {
	font-size: 28rpx;
	color: #999;
}
.pay {
	height: 88rpx;
	line-height: 88rpx;
	font-size: 32rpx;
	color: #333;
}
.pay .fr {
	
}
.requirement {
	border-bottom: 1rpx solid #dfdfdf;
}
.requirement view {
	color: #333;
	font-size: 32rpx;
	line-height: 100rpx;
	height: 100rpx;
	border-bottom: 1rpx solid #dfdfdf;
}
.requirement input {
	height: 136rpx;
}
.requirement1 {
	min-height: 120rpx;
	/* border-bottom: 1rpx solid #dfdfdf; */
}
.requirement1 view {
	float: left;
	color: #333;
	font-size: 32rpx;
	line-height: 50rpx;
	height: 50rpx;
}
.requirement1 input {
	float: left;
	width: 150rpx;
	height: 50rpx;
	border: 1rpx solid #dcdbdb;
	border-radius: 10rpx;
}
.btn {
	margin: 30rpx auto;
	background-color: $uni-color1;
	width: 686rpx;
	height: 100rpx;
	line-height: 100rpx;
	text-align: center;
	box-shadow: 0px 6rpx 20rpx 0px $uni-color1;
	border-radius: 10rpx;
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
}
.details .tit {
	width: 100%;
	min-height: 50rpx;
	font-size: 30rpx;
	color: #333;
	margin-top: 30rpx;
}
.details .tit image {
	width: 30rpx;
	margin-top: 8rpx;
	margin-right: 16rpx;
}
.details .tit .arr {
	width: 14rpx;
	margin-top: 10rpx;
	margin-left: 20rpx;
}
.details .cont {
	font-size: 24rpx;
	color: #999;
	padding: 22rpx 0;
	margin-bottom: 46rpx;
}
.details .cont image {
	width: 110rpx;
	border-radius: 10rpx;
}
.details .cont .name {
	font-size: 26rpx;
	color: #333;
	margin-bottom: 10rpx;
}
.details .cont .price {
	margin-top: 40rpx;
}
.public-tick {
	height: 100%;
	width: 100%;
	background-color: #f9fafb;
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
}
/* 导航 */
.public-tick .header {
	height: 100rpx;
	width: 100%;
	background: #fff;
	line-height: 95rpx;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
	font-size: 36rpx;
	color: #333;
	font-weight: 500;
	text-align: center;
}
.public-tick .header image {
	margin-top: 26rpx;
	width: 38rpx;
	position: absolute;
}
.public-tick .header .fr image {
	position: absolute;
	right: 32rpx;
}
.public-tick .header .fl text {
	margin-left: 14rpx;
}
.public-tick .header .tab {
	margin-left: 120rpx;
}
.public-tick .header .tab text {
	text-align: center;
	display: inline-block;
	font-size: 32rpx;
	color: #666;
	position: relative;
}
.public-tick .header .tab .tit {
	margin-right: 90rpx;
}
.public-tick .header .tab .tit:last-child {
	margin-right: 0;
}
.public-tick .header .tab .cur_sp {
	position: absolute;
}
.public-tick .header .tab .cur {
	font-weight: 500;
	color: #333;
}
.public-tick .header .tab .cur .cur_sp {
	width: 30rpx;
	height: 4rpx;
	background: $uni-color1;
	border-radius: 2rpx;
	right: 17rpx;
	bottom: 0;
}
.public-tick .list .clearfix {
	width: 100%;
	height: 176rpx;
	background-color: #fff;
	margin-top: 20rpx;
	/* overflow: hidden; */
}
.canuse-body1 {
	width: 350rpx;
	margin-left: 30rpx;
}
.canuse-body2 {
	width: 210rpx;
	/* text-align: center; */
	font-size: 44rpx;
	line-height: 124rpx;
	height: 124rpx;
	margin-top: 30rpx;
	// border-left: 1rpx dashed #BBBBBB;
	// padding-left: 20rpx;
}
.canuse-body2 view{
	color: $uni-color1 !important;
}
.canuse-body3{
	width: 32rpx;
	height: 32rpx;
}
.public-tick .list .clearfix .fl .title {
	color: #333333;
	font-size: 26rpx;
	margin-top: 30rpx;
	line-height: 37rpx;
	margin-bottom: 4rpx;
	border-bottom: 0 none;
	height: 37rpx;
	font-family: PingFangSC-Medium, PingFang SC;
}
.public-tick .list .clearfix .fl .time {
	font-size: 24rpx;
	color: #999;
	line-height: 33rpx;
	/* margin-bottom: 28rpx; */
}
.public-tick .list .clearfix .fl .text {
	font-size: 24rpx;
	color: #999;
	height: 68rpx;
	line-height: 33rpx;
	/* margin-bottom: 28rpx; */
}
.public-tick .list .clearfix .fl .state {
	min-width: 104rpx;
	height: 38rpx;
	line-height: 38rpx;
	text-align: center;
	border-radius: 6rpx;
	background: linear-gradient(270deg, #98d7ff 0%, #e782e9 100%);
	color: #fff;
	font-size: 26rpx;
	margin-bottom: 20rpx;
}
.public-tick .top {
	width: 91.48%;
	margin-left: 4.26%;
	margin-top: 18rpx;
	height: 92rpx;
	background: #FFFFFF;
	border-radius: 4px;
	border: 1rpx dashed $uni-color1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	
	font-size: 24rpx;
	font-family: PingFangSC-Regular, PingFang SC;
	font-weight: 400;
	color: #333333;
}
.public-tick .top image {
	width: 20rpx;
	height: 20rpx;
	margin-right: 20rpx;
}
.public-tick .btn {
	width: 100%;
	height: 140rpx;
	background-color: #fff;
	border-top: 1rpx solid #dfdfdf;
	position: fixed;
	bottom: 0;
	margin-bottom: 0;
	box-shadow: 0 0 0 0;
}
.public-tick .btn view {
	width: 686rpx;
	height: 100rpx;
	background-color: $uni-color1;
	box-shadow: 0 6rpx 20rpx 0 $uni-color1;
	border-radius: 10rpx;
	color: #fff;
	text-align: center;
	font-size: 36rpx;
	line-height: 100rpx;
	margin: 0 auto;
	/* margin-top: 14rpx; */
}
.act {
	border: 1rpx solid $uni-color1;
	box-sizing: border-box;
}
.view_time .cont {
	width: 540rpx;
	padding-top: 40rpx;
	font-size: 30rpx;
	color: #a4a9b0;
	background-color: #fff;
	border-radius: 16rpx;
}
.view_time .cont .title {
	color: #333;
	font-size: 34rpx;
	text-align: center;
	line-height: 48rpx;
	margin-bottom: 40rpx;
}
.view_time .cont input {
	width: 390rpx;
	height: 80rpx;
	line-height: 80rpx;
	margin: 0 auto;
	padding-left: 30rpx;
	background-color: #f6f6f9;
}
.view_time .cont .clearfix {
	margin-top: 40rpx;
	height: 90rpx;
	line-height: 90rpx;
}
.view_time .cont .clearfix view {
	width: 49%;
	font-size: 32rpx;
	color: $uni-color1;
	text-align: center;
	font-weight: 500;
}
.view_time .cont .clearfix .fl {
	border-right: 1rpx solid #e7e7e7;
	font-weight: 400;
}
.adds_list{
	overflow: auto;
	height: 88%;
}
.adds_list .list {
	padding: 20rpx 32rpx;
	/* border-bottom: 1rpx solid #dfdfdf; */
	box-sizing: border-box;
}
.adds_list .list .fl view {
	font-size: 22rpx;
	color: #999;
	line-height: 30rpx;
	min-width: 48rpx;
}
.adds_list .list .fl .dot {
	width: 34rpx;
	height: 34rpx;
	border-radius: 100%;
	border: 1rpx solid #d6d6d6;
	margin-top: 16rpx;
	margin-bottom: 6rpx;
	margin-left: 4rpx;
}
.adds_list .list .fr {
	width: 624rpx;
	font-size: 26rpx;
	color: #999999;
	line-height: 37rpx;
}
.adds_list .list .fr .name {
	color: #333;
	font-size: 26rpx;
	margin-bottom: 6rpx;
	height: auto;
}
.adds_list .list .fr .name .fr {
	width: auto;
	margin-left: 58rpx;
}
.adds_list .list .fr .name .edit {
	color: $uni-color1;
}
.adds_list .list .fr .name .delete {
	color: #ff7272;
}
.adds_list .list .fr .phone {
	color: #666;
	font-size: 26rpx;
	margin-bottom: 10rpx;
}
.adds_list .bg_5EBEFF {
	background-color: #5ebeff;
	border: 0 none !important;
}
.adds_list .add {
	width: 686rpx;
	height: 100rpx;
	text-align: center;
	color: #fff;
	line-height: 100rpx;
	border-radius: 10rpx;
	box-shadow: 0px 6px 20px 0px $uni-color1;
	background-color: $uni-color1;
	font-size: 36rpx;
	position: fixed;
	bottom: 40rpx;
	left: 50%;
	margin-left: -343rpx;
}
.list_saff{
	width: 335rpx;
	height: 169rpx;
	margin-right: 6rpx;
	margin-bottom: 20rpx;
}
.list_saff image{
	width: 128rpx;
	height: 155rpx;
	margin: 0 24rpx;
}
.list_saff .fl{
	font-size: 24rpx;
	color: #999;
}
.list .list_saff .fl view{
	width: 140rpx;
	margin: 6rpx 0;
}
.list .list_saff .fl .name{
	margin-top: 16rpx;
	font-size: 28rpx;
	color: #666;
	line-height: 40rpx;
	font-weight: 500;
	margin: 10rpx 0;
}
</style>
